"""
Author: Jian SuiYue kaohx0214@yeah.net
Date: 2025-04-25 17:25:43
LastEditTime: 2025-05-22 23:26:36
FilePath: LibraryManagerStudio/web/config.py
"""
import os.path

from pydantic.v1 import BaseSettings

APPID: str = "wx4a81205826be6d73"
APPSECRET: str = "47bbf1a89a100b0e69a8553b312042eb"
STATIC_BOOK_COVER_PATH: str = os.path.join('..', 'static', 'book')
STATIC_USER_AVATAR_PATH: str = os.path.join('..', 'static', 'avatar')

class Settings(BaseSettings):
    DATABASE_URI: str = "sqlite:///./app.db"
    API_DOCS: bool = True
    CLEANUP_INTERVAL: int = 300  # 5 minutes
    SESSION_TIMEOUT: int = 3600  # 1 hour
    CONFIG_DIR: str = "configs"
    DEFAULT_USER_ID: str = "elysia@kaohx.com"
    UPGRADE_DATABASE: bool = False

    model_config = {"env_prefix": "LIBRARYADMINSTUDIO_"}


settings = Settings()
